package com.cstz.hb.manage.controller;

import com.cstz.enums.DeptTypeEnum;
import com.cstz.hb.manage.domain.AppUser;
import com.cstz.hb.manage.domain.ReportDto;
import com.cstz.hb.manage.domain.SysDept;
import com.cstz.hb.manage.service.AppUserService;
import com.cstz.hb.manage.service.SysDeptService;
import com.cstz.hb.manage.service.SysQuestionService;
import com.cstz.ydshop.common.annotation.Log;
import com.cstz.ydshop.common.controller.BaseController;
import com.cstz.ydshop.common.utils.*;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.*;

import java.util.Date;
import java.util.List;
import java.util.Map;

@RequestMapping("/web/report")
@Controller
public class ReportController extends BaseController {

    private String prefix="hbManage/report"  ;

    @Autowired
    private SysQuestionService questionService;

	@GetMapping("")
	String report(Model model) {
		return prefix + "/report";
	}

	@GetMapping("/analysis")
    @ResponseBody
	private List<ReportDto> analysis(@RequestParam Map<String, Object> params){
        params.put("userId",getUserId());
        return questionService.analysis(params);
    }
}
